<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no">
  <meta name="description" content="API docs for the PinCodeTextField constructor from the Class PinCodeTextField class from the pin_code_fields library, for the Dart programming language.">
  <title>PinCodeTextField constructor - PinCodeTextField class - pin_code_fields library - Dart API</title>
  <!-- required because all the links are pseudo-absolute -->
  <base href="../..">

  <link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500,400i,400,300|Source+Sans+Pro:400,300,700" rel="stylesheet">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  <link rel="stylesheet" href="static-assets/github.css">
  <link rel="stylesheet" href="static-assets/styles.css">
  <link rel="icon" href="static-assets/favicon.png">
  
</head>

<body>

<div id="overlay-under-drawer"></div>

<header id="title">
  <button id="sidenav-left-toggle" type="button">&nbsp;</button>
  <ol class="breadcrumbs gt-separated dark hidden-xs">
    <li><a href="index.html">pin_code_fields</a></li>
    <li><a href="pin_code_fields/pin_code_fields-library.html">pin_code_fields</a></li>
    <li><a href="pin_code_fields/PinCodeTextField-class.html">PinCodeTextField</a></li>
    <li class="self-crumb">PinCodeTextField constructor</li>
  </ol>
  <div class="self-name">PinCodeTextField</div>
  <form class="search navbar-right" role="search">
    <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<main>

  <div id="dartdoc-sidebar-left" class="col-xs-6 col-sm-3 col-md-2 sidebar sidebar-offcanvas-left">
    <header id="header-search-sidebar" class="hidden-l">
      <form class="search-sidebar" role="search">
        <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
      </form>
    </header>
    
    <ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
      <li><a href="index.html">pin_code_fields</a></li>
      <li><a href="pin_code_fields/pin_code_fields-library.html">pin_code_fields</a></li>
      <li><a href="pin_code_fields/PinCodeTextField-class.html">PinCodeTextField</a></li>
      <li class="self-crumb">PinCodeTextField constructor</li>
    </ol>
    
    <h5>PinCodeTextField class</h5>
    <ol>
      <li class="section-title"><a href="pin_code_fields/PinCodeTextField-class.html#constructors">Constructors</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/PinCodeTextField.html">PinCodeTextField</a></li>
    
      <li class="section-title">
        <a href="pin_code_fields/PinCodeTextField-class.html#instance-properties">Properties</a>
      </li>
      <li><a href="pin_code_fields/PinCodeTextField/activeColor.html">activeColor</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/affirmativeText.html">affirmativeText</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/animationCurve.html">animationCurve</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/animationDuration.html">animationDuration</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/animationType.html">animationType</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/autoFocus.html">autoFocus</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/backgroundColor.html">backgroundColor</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/borderRadius.html">borderRadius</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/borderWidth.html">borderWidth</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/controller.html">controller</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/dialogContent.html">dialogContent</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/dialogTitle.html">dialogTitle</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/disabledColor.html">disabledColor</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/enabled.html">enabled</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/fieldHeight.html">fieldHeight</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/fieldWidth.html">fieldWidth</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/focusNode.html">focusNode</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/inactiveColor.html">inactiveColor</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/inputFormatters.html">inputFormatters</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/length.html">length</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/mainAxisAlignment.html">mainAxisAlignment</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/negavtiveText.html">negavtiveText</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/obsecureText.html">obsecureText</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/onChanged.html">onChanged</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/onCompleted.html">onCompleted</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/selectedColor.html">selectedColor</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/shape.html">shape</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/textInputType.html">textInputType</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/textStyle.html">textStyle</a></li>
      <li class="inherited"><a href="dart-core/Object/hashCode.html">hashCode</a></li>
      <li class="inherited"><a href="pin_code_fields/PinCodeTextField/key.html">key</a></li>
      <li class="inherited"><a href="dart-core/Object/runtimeType.html">runtimeType</a></li>
    
      <li class="section-title"><a href="pin_code_fields/PinCodeTextField-class.html#instance-methods">Methods</a></li>
      <li><a href="pin_code_fields/PinCodeTextField/createState.html">createState</a></li>
      <li class="inherited"><a href="pin_code_fields/PinCodeTextField/createElement.html">createElement</a></li>
      <li class="inherited"><a href="pin_code_fields/PinCodeTextField/debugDescribeChildren.html">debugDescribeChildren</a></li>
      <li class="inherited"><a href="pin_code_fields/PinCodeTextField/debugFillProperties.html">debugFillProperties</a></li>
      <li class="inherited"><a href="dart-core/Object/noSuchMethod.html">noSuchMethod</a></li>
      <li class="inherited"><a href="pin_code_fields/PinCodeTextField/toDiagnosticsNode.html">toDiagnosticsNode</a></li>
      <li class="inherited"><a href="pin_code_fields/PinCodeTextField/toString.html">toString</a></li>
      <li class="inherited"><a href="pin_code_fields/PinCodeTextField/toStringDeep.html">toStringDeep</a></li>
      <li class="inherited"><a href="pin_code_fields/PinCodeTextField/toStringShallow.html">toStringShallow</a></li>
      <li class="inherited"><a href="pin_code_fields/PinCodeTextField/toStringShort.html">toStringShort</a></li>
    
      <li class="section-title inherited"><a href="pin_code_fields/PinCodeTextField-class.html#operators">Operators</a></li>
      <li class="inherited"><a href="dart-core/Object/operator_equals.html">operator ==</a></li>
    
    
    
    </ol>
  </div><!--/.sidebar-offcanvas-left-->

  <div id="dartdoc-main-content" class="col-xs-12 col-sm-9 col-md-8 main-content">
      <div><h1><span class="kind-constructor">PinCodeTextField</span> constructor</h1></div>

    <section class="multi-line-signature">
      
      <span class="name ">PinCodeTextField</span>(<wbr>{<span class="parameter" id="-param-key"><span class="type-annotation">Key</span> <span class="parameter-name">key</span>, </span> <span class="parameter" id="-param-length"><span>@required</span> <span class="type-annotation"><a href="dart-core/int-class.html">int</a></span> <span class="parameter-name">length</span>, </span> <span class="parameter" id="-param-controller"><span class="type-annotation">TextEditingController</span> <span class="parameter-name">controller</span>, </span> <span class="parameter" id="-param-obsecureText"><span class="type-annotation"><a href="dart-core/bool-class.html">bool</a></span> <span class="parameter-name">obsecureText</span>: <span class="default-value">false</span>, </span> <span class="parameter" id="-param-onChanged"><span>@required</span> <span class="type-annotation">ValueChanged<span class="signature">&lt;<wbr><span class="type-parameter"><a href="dart-core/String-class.html">String</a></span>&gt;</span></span> <span class="parameter-name">onChanged</span>, </span> <span class="parameter" id="-param-onCompleted"><span class="type-annotation">ValueChanged<span class="signature">&lt;<wbr><span class="type-parameter"><a href="dart-core/String-class.html">String</a></span>&gt;</span></span> <span class="parameter-name">onCompleted</span>, </span> <span class="parameter" id="-param-backgroundColor"><span class="type-annotation"><a href="dart-ui/Color-class.html">Color</a></span> <span class="parameter-name">backgroundColor</span>: <span class="default-value">Colors.white</span>, </span> <span class="parameter" id="-param-borderRadius"><span class="type-annotation">BorderRadius</span> <span class="parameter-name">borderRadius</span>, </span> <span class="parameter" id="-param-fieldHeight"><span class="type-annotation"><a href="dart-core/double-class.html">double</a></span> <span class="parameter-name">fieldHeight</span>: <span class="default-value">50</span>, </span> <span class="parameter" id="-param-fieldWidth"><span class="type-annotation"><a href="dart-core/double-class.html">double</a></span> <span class="parameter-name">fieldWidth</span>: <span class="default-value">40</span>, </span> <span class="parameter" id="-param-activeColor"><span class="type-annotation"><a href="dart-ui/Color-class.html">Color</a></span> <span class="parameter-name">activeColor</span>: <span class="default-value">Colors.green</span>, </span> <span class="parameter" id="-param-selectedColor"><span class="type-annotation"><a href="dart-ui/Color-class.html">Color</a></span> <span class="parameter-name">selectedColor</span>: <span class="default-value">Colors.blue</span>, </span> <span class="parameter" id="-param-inactiveColor"><span class="type-annotation"><a href="dart-ui/Color-class.html">Color</a></span> <span class="parameter-name">inactiveColor</span>: <span class="default-value">Colors.red</span>, </span> <span class="parameter" id="-param-disabledColor"><span class="type-annotation"><a href="dart-ui/Color-class.html">Color</a></span> <span class="parameter-name">disabledColor</span>: <span class="default-value">Colors.grey</span>, </span> <span class="parameter" id="-param-borderWidth"><span class="type-annotation"><a href="dart-core/double-class.html">double</a></span> <span class="parameter-name">borderWidth</span>: <span class="default-value">2</span>, </span> <span class="parameter" id="-param-mainAxisAlignment"><span class="type-annotation">MainAxisAlignment</span> <span class="parameter-name">mainAxisAlignment</span>: <span class="default-value">MainAxisAlignment.spaceBetween</span>, </span> <span class="parameter" id="-param-animationDuration"><span class="type-annotation"><a href="dart-core/Duration-class.html">Duration</a></span> <span class="parameter-name">animationDuration</span>: <span class="default-value">const Duration(milliseconds: 150)</span>, </span> <span class="parameter" id="-param-animationCurve"><span class="type-annotation">Curve</span> <span class="parameter-name">animationCurve</span>: <span class="default-value">Curves.easeInOut</span>, </span> <span class="parameter" id="-param-shape"><span class="type-annotation"><a href="pin_code_fields/PinCodeFieldShape-class.html">PinCodeFieldShape</a></span> <span class="parameter-name">shape</span>: <span class="default-value">PinCodeFieldShape.underline</span>, </span> <span class="parameter" id="-param-animationType"><span class="type-annotation"><a href="pin_code_fields/AnimationType-class.html">AnimationType</a></span> <span class="parameter-name">animationType</span>: <span class="default-value">AnimationType.slide</span>, </span> <span class="parameter" id="-param-textInputType"><span class="type-annotation">TextInputType</span> <span class="parameter-name">textInputType</span>: <span class="default-value">TextInputType.visiblePassword</span>, </span> <span class="parameter" id="-param-autoFocus"><span class="type-annotation"><a href="dart-core/bool-class.html">bool</a></span> <span class="parameter-name">autoFocus</span>: <span class="default-value">false</span>, </span> <span class="parameter" id="-param-focusNode"><span class="type-annotation">FocusNode</span> <span class="parameter-name">focusNode</span>, </span> <span class="parameter" id="-param-enabled"><span class="type-annotation"><a href="dart-core/bool-class.html">bool</a></span> <span class="parameter-name">enabled</span>: <span class="default-value">true</span>, </span> <span class="parameter" id="-param-inputFormatters"><span class="type-annotation"><a href="dart-core/List-class.html">List</a><span class="signature">&lt;<wbr><span class="type-parameter">TextInputFormatter</span>&gt;</span></span> <span class="parameter-name">inputFormatters</span>: <span class="default-value">const <TextInputFormatter>[]</span>, </span> <span class="parameter" id="-param-dialogContent"><span class="type-annotation"><a href="dart-core/String-class.html">String</a></span> <span class="parameter-name">dialogContent</span>: <span class="default-value">"Do you want to paste this code "</span>, </span> <span class="parameter" id="-param-dialogTitle"><span class="type-annotation"><a href="dart-core/String-class.html">String</a></span> <span class="parameter-name">dialogTitle</span>: <span class="default-value">"Paste Code"</span>, </span> <span class="parameter" id="-param-affirmativeText"><span class="type-annotation"><a href="dart-core/String-class.html">String</a></span> <span class="parameter-name">affirmativeText</span>: <span class="default-value">"Paste"</span>, </span> <span class="parameter" id="-param-negavtiveText"><span class="type-annotation"><a href="dart-core/String-class.html">String</a></span> <span class="parameter-name">negavtiveText</span>: <span class="default-value">"Cancel"</span>, </span> <span class="parameter" id="-param-textStyle"><span class="type-annotation">TextStyle</span> <span class="parameter-name">textStyle</span>: <span class="default-value">const TextStyle(fontSize: 20, color: Colors.black, fontWeight: FontWeight.bold)</span></span> })
    </section>

    
    <section class="summary source-code" id="source">
      <h2><span>Implementation</span></h2>
      <pre class="language-dart"><code class="language-dart">PinCodeTextField({
  Key key,
  @required this.length,
  this.controller,
  this.obsecureText = false,
  @required this.onChanged,
  this.onCompleted,
  this.backgroundColor = Colors.white,
  this.borderRadius,
  this.fieldHeight = 50,
  this.fieldWidth = 40,
  this.activeColor = Colors.green,
  this.selectedColor = Colors.blue,
  this.inactiveColor = Colors.red,
  this.disabledColor = Colors.grey,
  this.borderWidth = 2,
  this.mainAxisAlignment = MainAxisAlignment.spaceBetween,
  this.animationDuration = const Duration(milliseconds: 150),
  this.animationCurve = Curves.easeInOut,
  this.shape = PinCodeFieldShape.underline,
  this.animationType = AnimationType.slide,
  this.textInputType = TextInputType.visiblePassword,
  this.autoFocus = false,
  this.focusNode,
  this.enabled = true,
  this.inputFormatters = const &lt;TextInputFormatter&gt;[],
  this.dialogContent = &quot;Do you want to paste this code &quot;,
  this.dialogTitle = &quot;Paste Code&quot;,
  this.affirmativeText = &quot;Paste&quot;,
  this.negavtiveText = &quot;Cancel&quot;,
  this.textStyle = const TextStyle(
    fontSize: 20,
    color: Colors.black,
    fontWeight: FontWeight.bold,
  ),
}) : super(key: key);</code></pre>
    </section>

  </div> <!-- /.main-content -->

  <div id="dartdoc-sidebar-right" class="col-xs-6 col-sm-6 col-md-2 sidebar sidebar-offcanvas-right">
  </div><!--/.sidebar-offcanvas-->

</main>

<footer>
  <span class="no-break">
    pin_code_fields 2.3.0+2
  </span>

  
</footer>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="static-assets/typeahead.bundle.min.js"></script>
<script src="static-assets/highlight.pack.js"></script>
<script src="static-assets/URI.js"></script>
<script src="static-assets/script.js"></script>


</body>

</html>
